<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            border: 1px solid red;
            width: 50px;
            height: 80px;
        }
        div:hover{
            position: relative;/*相对定位*/
            left: 20px;
        }
        #div4{
            width: 100px;
            height: 100px;
            background-color: green;
            margin: 10px 0px 0px 10px;
        }
        #div4>div{
            width: 60px;
            height: 60px;
            background-color: lightcoral;
            position: relative;/*做参照物用的*/
        }
        #div4>div>div{
            width: 30px;
            height: 30px;
            background-color: skyblue;
            position: absolute;
        }

        #div5{
            width: 300px;
            background-color: lightgray;
            padding: 10px ;
            position: relative;/*作为参照物*/
        }
        input {
            width: 250px;
            height: 20px;
            border: 1px solid black;
            padding: 10px 20px;
        }
        img{
            height: 38px;
            position: absolute;
            right: 19px;
            top: 10px;
        }
        #div6{
            width: 50px;
            height: 200px;
            background-color: black;
            position: fixed;
        }

    </style>

</head>
<body>

<div>div1</div>
<div>div2</div>
<div>div3</div>

<div id="div4">
    <div>div4
        <div></div>
    </div>
    <div></div>
</div>

<div id="div5">
    <input type="text" placeholder="请输入用户名">
    <img src="../day3_Img/2.png">
</div>


<!--固定定位-->
<div id="div6">
div6
</div>

</body>
</html>